<link type="text/css" href="/admins/js/pagerView/pager-view.css" rel="stylesheet" />
<link type="text/css" href="/admins/js/jquery/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/admins/js/jquery/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="/admins/js/jquery/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="/admins/js/pagerView/pager-view.js"></script>
<script type="text/javascript">
    $(function(){
    
        $.datepicker.setDefaults( $.datepicker.regional[ "zh-CN" ] );
        $( "#dateinbegin" ).datepicker();
        $( "#dateinend" ).datepicker();
    });
</script>

<div  class="biaoge">
    <?php if($this->stype=="15"){ ?>
    <form action="/admini/manageday/insandouts"  method="post" style="margin:0px" id="form1">
    <div style="margin-top: 20px;padding: 10px;font-size: 16px;">        
        选择工作人员：
        <select id="selNikeName" name="selNikeName" style="padding: 2px;font-size: 16px;">
            <?php foreach ($this->adminUserAll as $adminUserVal) { ?>
                <option value="<?php echo $adminUserVal->id;?>" <?php echo $adminUserVal->id==$this->user?"selected":"";?>><?php echo $adminUserVal->Nikename;?></option>
            <?php } ?>
        </select>        
        　<label for="starttime">日期时间：</label><input type="text" id="dateinbegin" name="dateinbegin" value="<?php echo $this->dateinbegin; ?>" />
          <label for="endtime">--&nbsp;</label><input type="text" id="dateinend" name="dateinend" value="<?php echo $this->dateinend; ?>" />
          <input type="hidden" name="day" value="<?php echo $this->day; ?>"/>
          <input type="submit" id="queryButton" name="queryButton" value="查询"/>
    </div>
    </form>
    <?php } ?>
    <table width="920" border="1" cellpadding="0" cellspacing="0" style="font-size: 18px;margin-top: 10px;float:left;">
        <tr align="center"><td colspan="7"><?php if($this->stype=="15"){$num=1; ?>( <?php echo $this->userDetail->Nikename;?> ) 出入库的统计数据 [最近31天]<?php }else if($this->stype == "16"){$num=2; echo "当月出入库的统计数据";}?></td></tr>
        <tr align="center">
            <td>时间</td>
            <td>入库包裹数</td>
            <td>入库总重量(kg)</td>
            <td>出库运单数</td>
            <td>出库运单总重量(kg)</td>
        </tr>
        <?php foreach($this->timeArray as $val){ ?>
        <tr align="center">
            <td><?=$val?></td>
            <td><?=$this->inDaysCount[$val]?></td>
            <td><?=$this->inDaysWeight[$val]?$this->inDaysWeight[$val]/1000:"0"?></td>
            <td><?=$this->outDaysCount[$val]?></td>
            <td><?=$this->outDaysWeight[$val]?$this->outDaysWeight[$val]/1000:"0"?></td>
        </tr>
        <?php } ?>
        <tr align="center">
            <td>总计</td>
            <td><?php echo $this->incount;?></td>
            <td><?php echo ($this->inweight/1000)."kg";?></td>
            <td><?php echo $this->outcount; ?></td>
            <td><?php echo ($this->outweight/1000)."kg"; ?></td>
        </tr>
    </table>
</div>
<script>
    $("#selNikeName").change(function(){
       var userid = $(this).val();
       location.href = "/admini/manageday/insandouts/day/31/user/"+userid;
    });
</script>

<script type="text/javascript">
    $(function(){
    
        $.datepicker.setDefaults( $.datepicker.regional[ "zh-CN" ] );
        $( "#starttime" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
        $( "#endtime" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
    });
</script>